#prompt-manager {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 340px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#prompt-manager.minimized {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

#prompt-manager.minimized .pm-header {
    border-bottom: none;
    padding: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#prompt-manager.minimized .pm-header h3 {
    display: none;
}

#prompt-manager.minimized .pm-header-buttons {
    display: none;
}

#prompt-manager.minimized .pm-list,
#prompt-manager.minimized .pm-modal,
#prompt-manager.minimized .pm-search-container {
    display: none !important;
}

#prompt-manager.minimized .pm-header::before {
    content: 'AI';
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.pm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px 16px 0 0;
    flex-direction: column;
    gap: 16px
}

.pm-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pm-header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.pm-icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.pm-icon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.pm-icon-btn:hover::before {
    opacity: 1;
}

.pm-icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pm-icon-btn:active {
    transform: translateY(0);
}

#pm-export {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

#pm-export::before {
    background: linear-gradient(135deg, #059669, #047857);
}

#pm-import {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

#pm-import::before {
    background: linear-gradient(135deg, #d97706, #b45309);
}

#pm-minimize {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

#pm-minimize::before {
    background: linear-gradient(135deg, #4b5563, #374151);
}

#pm-add {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

#pm-add::before {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

#pm-delete-all {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

#pm-delete-all::before {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.pm-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.pm-item {
    display: flex;
    align-items: center;
    padding: 14px;
    margin: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pm-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.pm-item-title {
    flex: 1;
    font-size: 14px;
    color: white;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pm-item-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s;
}

.pm-item:hover .pm-item-actions {
    opacity: 1;
}

.pm-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.pm-modal.show {
    display: flex;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pm-modal-content {
    background: white;
    width: 460px;
    max-width: 90vw;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pm-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 16px 16px 0 0;
}

.pm-modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.pm-modal-body {
    padding: 20px;
}

.pm-input,
.pm-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    margin: 10px 0;
    font-size: 14px;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.pm-input:focus,
.pm-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pm-textarea {
    height: 120px;
    resize: vertical;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.pm-modal-footer {
    padding: 20px;
    text-align: right;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

.pm-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-left: 8px;
}

.pm-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.pm-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.pm-btn:not(.pm-primary) {
    background: #f1f5f9;
    color: #475569;
}

.pm-btn:not(.pm-primary):hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.pm-search-container {
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.pm-search {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.pm-search::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.pm-search:focus {
    border-color: #60a5fa;
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* 滚动条样式 */
.pm-list::-webkit-scrollbar,
.pm-modal-content::-webkit-scrollbar {
    width: 6px;
}

.pm-list::-webkit-scrollbar-track,
.pm-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.pm-list::-webkit-scrollbar-thumb,
.pm-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.pm-list::-webkit-scrollbar-thumb:hover,
.pm-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}